package com.zxl.register.server.command;

import com.zxl.register.base.Event;
import com.zxl.register.base.Result;
import com.zxl.register.server.core.ServiceRegistCore;
import lombok.Data;

import java.io.IOException;
import java.util.Map;

@Data
public class SubscribeHandler extends CommandHandler {

    @Override
    public String getKey() {
        this.key="subscribe";
        return key;
    }

    @Override
    public Result handle(Event event) {
       return  ServiceRegistCore.subscribe(event.getInstance().getAddress(),event.getArgs());
    }
}
